Optimal. Leaf size=144 \[ \frac {\log (f+g x) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )}{g}-\frac {2 B \text {Li}_2\left (\frac {b (f+g x)}{b f-a g}\right )}{g}-\frac {2 B \log (f+g x) \log \left (-\frac {g (a+b x)}{b f-a g}\right )}{g}+\frac {2 B \text {Li}_2\left (\frac {d (f+g x)}{d f-c g}\right )}{g}+\frac {2 B \log (f+g x) \log \left (-\frac {g (c+d x)}{d f-c g}\right )}{g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2524, 12, 2418, 2394, 2393, 2391} \[ -\frac {2 B \text {PolyLog}\left (2,\frac {b (f+g x)}{b f-a g}\right )}{g}+\frac {2 B \text {PolyLog}\left (2,\frac {d (f+g x)}{d f-c g}\right )}{g}+\frac {\log (f+g x) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )}{g}-\frac {2 B \log (f+g x) \log \left (-\frac {g (a+b x)}{b f-a g}\right )}{g}+\frac {2 B \log (f+g x) \log \left (-\frac {g (c+d x)}{d f-c g}\right )}{g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2391
Rule 2393
Rule 2394
Rule 2418
Rule 2524
Rubi steps
\begin {align*} \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{f+g x} \, dx &=\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)}{g}-\frac {B \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (f+g x)}{e (a+b x)^2} \, dx}{g}\\ &=\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)}{g}-\frac {B \int \frac {(c+d x)^2 \left (-\frac {2 d e (a+b x)^2}{(c+d x)^3}+\frac {2 b e (a+b x)}{(c+d x)^2}\right ) \log (f+g x)}{(a+b x)^2} \, dx}{e g}\\ &=\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)}{g}-\frac {B \int \left (\frac {2 b e \log (f+g x)}{a+b x}-\frac {2 d e \log (f+g x)}{c+d x}\right ) \, dx}{e g}\\ &=\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)}{g}-\frac {(2 b B) \int \frac {\log (f+g x)}{a+b x} \, dx}{g}+\frac {(2 B d) \int \frac {\log (f+g x)}{c+d x} \, dx}{g}\\ &=-\frac {2 B \log \left (-\frac {g (a+b x)}{b f-a g}\right ) \log (f+g x)}{g}+\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)}{g}+\frac {2 B \log \left (-\frac {g (c+d x)}{d f-c g}\right ) \log (f+g x)}{g}+(2 B) \int \frac {\log \left (\frac {g (a+b x)}{-b f+a g}\right )}{f+g x} \, dx-(2 B) \int \frac {\log \left (\frac {g (c+d x)}{-d f+c g}\right )}{f+g x} \, dx\\ &=-\frac {2 B \log \left (-\frac {g (a+b x)}{b f-a g}\right ) \log (f+g x)}{g}+\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)}{g}+\frac {2 B \log \left (-\frac {g (c+d x)}{d f-c g}\right ) \log (f+g x)}{g}+\frac {(2 B) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b f+a g}\right )}{x} \, dx,x,f+g x\right )}{g}-\frac {(2 B) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {d x}{-d f+c g}\right )}{x} \, dx,x,f+g x\right )}{g}\\ &=-\frac {2 B \log \left (-\frac {g (a+b x)}{b f-a g}\right ) \log (f+g x)}{g}+\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \log (f+g x)}{g}+\frac {2 B \log \left (-\frac {g (c+d x)}{d f-c g}\right ) \log (f+g x)}{g}-\frac {2 B \text {Li}_2\left (\frac {b (f+g x)}{b f-a g}\right )}{g}+\frac {2 B \text {Li}_2\left (\frac {d (f+g x)}{d f-c g}\right )}{g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 119, normalized size = 0.83 \[ \frac {\log (f+g x) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )-2 B \log \left (\frac {g (a+b x)}{a g-b f}\right )+A+2 B \log \left (\frac {g (c+d x)}{c g-d f}\right )\right )-2 B \text {Li}_2\left (\frac {b (f+g x)}{b f-a g}\right )+2 B \text {Li}_2\left (\frac {d (f+g x)}{d f-c g}\right )}{g} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.92, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {B \log \left (\frac {b^{2} e x^{2} + 2 \, a b e x + a^{2} e}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right ) + A}{g x + f}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \log \left (\frac {{\left (b x + a\right )}^{2} e}{{\left (d x + c\right )}^{2}}\right ) + A}{g x + f}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.15, size = 1143, normalized size = 7.94 \[ -\frac {2 B a c d \ln \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right ) \ln \left (-g +\frac {c g -d f}{d x +c}\right )}{\left (c g -d f \right ) \left (a d -b c \right )}+\frac {2 B a \,d^{2} f \ln \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right ) \ln \left (-g +\frac {c g -d f}{d x +c}\right )}{\left (c g -d f \right ) \left (a d -b c \right ) g}+\frac {2 B b \,c^{2} \ln \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right ) \ln \left (-g +\frac {c g -d f}{d x +c}\right )}{\left (c g -d f \right ) \left (a d -b c \right )}-\frac {2 B b c d f \ln \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right ) \ln \left (-g +\frac {c g -d f}{d x +c}\right )}{\left (c g -d f \right ) \left (a d -b c \right ) g}-\frac {2 B a c d \dilog \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right )}{\left (c g -d f \right ) \left (a d -b c \right )}+\frac {2 B a \,d^{2} f \dilog \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right )}{\left (c g -d f \right ) \left (a d -b c \right ) g}+\frac {2 B b \,c^{2} \dilog \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right )}{\left (c g -d f \right ) \left (a d -b c \right )}-\frac {2 B b c d f \dilog \left (\frac {a d g -b d f +\left (-g +\frac {c g -d f}{d x +c}\right ) \left (a d -b c \right )}{a d g -b d f}\right )}{\left (c g -d f \right ) \left (a d -b c \right ) g}+\frac {2 B a d \ln \left (\frac {1}{d x +c}\right ) \ln \left (\frac {b +\frac {a d -b c}{d x +c}}{b}\right )}{\left (a d -b c \right ) g}-\frac {2 B b c \ln \left (\frac {1}{d x +c}\right ) \ln \left (\frac {b +\frac {a d -b c}{d x +c}}{b}\right )}{\left (a d -b c \right ) g}+\frac {B c \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right ) \ln \left (-g +\frac {c g -d f}{d x +c}\right )}{c g -d f}-\frac {B d f \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right ) \ln \left (-g +\frac {c g -d f}{d x +c}\right )}{\left (c g -d f \right ) g}+\frac {2 B a d \dilog \left (\frac {b +\frac {a d -b c}{d x +c}}{b}\right )}{\left (a d -b c \right ) g}-\frac {2 B b c \dilog \left (\frac {b +\frac {a d -b c}{d x +c}}{b}\right )}{\left (a d -b c \right ) g}-\frac {B \ln \left (\frac {1}{d x +c}\right ) \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{g}-\frac {A \ln \left (\frac {1}{d x +c}\right )}{g}+\frac {A \ln \left (\frac {c g}{d x +c}-\frac {d f}{d x +c}-g \right )}{g} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -B \int -\frac {2 \, \log \left (b x + a\right ) - 2 \, \log \left (d x + c\right ) + \log \relax (e)}{g x + f}\,{d x} + \frac {A \log \left (g x + f\right )}{g} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )}{f+g\,x} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B \log {\left (\frac {a^{2} e}{c^{2} + 2 c d x + d^{2} x^{2}} + \frac {2 a b e x}{c^{2} + 2 c d x + d^{2} x^{2}} + \frac {b^{2} e x^{2}}{c^{2} + 2 c d x + d^{2} x^{2}} \right )}}{f + g x}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________